|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
8-bit flash mcu with op amps & comparators HT45F23A revision: v1.00 date: ???? 0 ?? ? 01 ? ???? 0 ?? ? 01 ?
rev. 1.00 ? ???? 0 ?? ? 01 ? rev. 1.00 ? ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators table of contents eates cpu feat ? res ......................................................................................................................... 7 periphera ? feat ? res ................................................................................................................. 8 genera? description ......................................................................................... 9 b?ock diagram ................................................................................................ 10 pin assignment ........... .................................................................................... 11 pin description .......... ..................................................................................... 11 abso??te maxim?m ratings .......................................................................... 14 d.c. characteristics ....................................................................................... 14 a.c. characteristics ....................................................................................... 17 op amplifer electrical characteristics comparator electrical characteristics c ? ocking and pipe ? ining ......................................................................................................... ? 0 program co ? nter ................................................................................................................... ? 1 stack ..................................................................................................................................... ?? arithmetic and logic unit C alu ........................................................................................... ?? f?ash program memor? ................................................................................. ?? str ? ct ? re ................................................................................................................................ ?? specia ? vectors ..................................................................................................................... ?? look- ? p tab ? e ............. ........................................................................................................... ? 4 tab ? e program examp ? e ........................................................................................................ ? 5 in circ ? it programming ......................................................................................................... ? 6 ram data memor? ......................................................................................... ?7 str ? ct ? re ................................................................................................................................ ? 7 specia ? f ? nction registers ................................................................................................... ? 8 indirect addressing registers C iar0 ? iar1 ......................................................................... ? 8 memor ? pointers C mp0 ? mp1 .............................................................................................. ? 9 bank pointer bp .................................................................................................................... ? 0 acc ? m ?? ator C acc ............................................................................................................... ? 0 program co ? nter low register C pcl .................................................................................. ? 0 look- ? p tab ? e registers C tblp ? tblh ................................................................................ ? 0 stat ? s register C status .................................................................................................... ? 1 eeprom data memory eeprom data memor ? str ? ct ? re ........................................................................................ ?? eeprom registers ............ .................................................................................................. ?? rev. 1.00 ? ???? 0?? ?01? rev. 1.00 ? ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators reading data from the eeprom ......................................................................................... ?? writing data to the eeprom ................................................................................................ ? 4 write protection ..................................................................................................................... ? 4 eeprom interr ? pt ............. ................................................................................................... ? 4 programming considerations ............. ................................................................................... ? 4 programming examp ? es ........................................................................................................ ? 5 oscillator ........................................................................................................ 36 osci ?? ator overview ............. .................................................................................................. ? 6 system clock confgurations ................................................................................................ ? 6 externa ? cr ? sta ? /ceramic osci ?? ator C hxt ........................................................................... ? 7 externa ? rc osci ?? ator C erc ............. .................................................................................. ? 7 externa ? osci ?? ator C ec ........................................................................................................ ? 8 interna ? rc osci ?? ator C hirc ............. .................................................................................. ? 8 externa ? ?? .768khz cr ? sta ? osci ?? ator C lxt ............. ........................................................... ? 8 lxt osci ?? ator low power f ? nction ...................................................................................... ? 9 interna ? ?? khz osci ?? ator C lirc ........................................................................................... ? 9 s ? pp ? ementar ? osci ?? ators .................................................................................................... 40 operating modes and system clocks ......................................................... 40 s ? stem c ? ocks ...................................................................................................................... 40 s ? stem operation modes ...................................................................................................... 40 contro ? register .................................................................................................................... 4 ? fast wake- ? p ........................................................................................................................ 44 operating mode switching and wake- ? p .............................................................................. 44 normal mode to slow mode switching ........................................................................... 45 slow mode to normal mode switching ........................................................................... 47 entering the sleep0 mode .................................................................................................. 47 entering the sleep1 mode .................................................................................................. 47 entering the idle0 mode ...................................................................................................... 48 entering the idle1 mode ...................................................................................................... 48 standb ? c ? rrent considerations ........................................................................................... 48 wake- ? p ................................................................................................................................ 49 programming considerations ............. ................................................................................... 49 watchdog timer ........... .................................................................................. 50 watchdog timer c ? ock so ? rce .............................................................................................. 50 watchdog timer contro ? register ............. ............................................................................ 50 watchdog timer operation ................................................................................................... 51 reset and initialisation .................................................................................. 52 reset f ? nctions ............. ....................................................................................................... 5 ? reset initia ? conditions ......................................................................................................... 54 input/output ports ......................................................................................... 57 p ??? -high resistors ................................................................................................................ 57 port a wake- ? p ............. ........................................................................................................ 58 i/o port contro ? registers ..................................................................................................... 58 rev. 1.00 4 ???? 0 ?? ? 01 ? rev. 1.00 5 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators port b nmos open drain contro ? register .......................................................................... 59 i/o pin str ? ct ? res .................................................................................................................. 59 programming considerations ............. ................................................................................... 59 timer/event counters ................................................................................... 60 &rjuljwkh7lphu(yhw&rwhu,sw&orfn6rufh .................................................... 61 timer registers C tmr0 ? tmr1l ? tmr1h ........................................................................... 61 timer contro ? registers C tmr0c ? tmr1c .......................................................................... 6 ? rq?xulq?wkh7lphu0rgh .................................................................................................. 6 ? rq?xulq?wkh(yhqwrxqwhu0rgh .................................................................................... 6 ? rq?xulq?wkh?xovh:lgwk0hdvxuhphqw0rgh ................................................................. 64 programmab ? e freq ? enc ? divider pfd ................................................................................ 65 presca ? er ............................................................................................................................... 66 i/o interfacing ........................................................................................................................ 67 timer/event co ? nter pins interna ? fi ? ter ............................................................................... 68 programming considerations ............. ................................................................................... 68 timer program examp ? e ....................................................................................................... 69 pulse width modulator .................................................................................. 70 pwm operation ..................................................................................................................... 70 6+ ? pwm mode .................................................................................................................... 71 7+1 pwm mode .................................................................................................................... 7 ? pwm o ? tp ? t contro ? ............................................................................................................. 7 ? analog to digital converter .......... ................................................................ 73 a/d overview ............. ........................................................................................................... 7 ? a/d converter register description ...................................................................................... 7 ? a/d converter data registers C adrl ? adrh ..................................................................... 74 a/d converter contro ? registers C adcr ? acsr ? adpcr .................................................. 74 a/d operation ....................................................................................................................... 77 a/d inp ? t pins ............. .......................................................................................................... 78 s ? mmar ? of a/d conversion steps ............. .......................................................................... 78 programming considerations ............. ................................................................................... 79 a/d transfer f ? nction ............. .............................................................................................. 79 a/d programming examp ? e ................................................................................................... 81 serial interface module C sim ....................................................................... 83 spi interface ......................................................................................................................... 8 ? spi registers ............. ........................................................................................................... 84 spi comm ? nication .............................................................................................................. 87 i ? c interface ............ .............................................................................................................. 89 i ? c registers ......................................................................................................................... 89 i ? c b ? s comm ? nication ........................................................................................................ 9 ? i ? c b ? s start signa ? ............................................................................................................... 94 s ? ave address ....................................................................................................................... 94 i ? c b ? s read/write signa ? .................................................................................................... 95 i ? c b ? s s ? ave address acknow ? edge signa ? ......................................................................... 95 i ? c b ? s data and acknow ? edge signa ? ............ ..................................................................... 95 rev. 1.00 4 ???? 0?? ?01? rev. 1.00 5 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators peripheral clock output ........... ..................................................................... 97 periphera ? c ? ock operation ............. ...................................................................................... 97 scom function for lcd ................................................................................ 98 lcd operation ............. ......................................................................................................... 98 lcd bias contro ? .................................................................................................................. 99 ldo f ? nction ...................................................................................................................... 100 operational amplifers .......... ...................................................................... 101 2shudwlrdopsolhu5hjlvwhuv ............. .............................................................................. 101 ?shudwlrqdopsolhu?shudwlrq ............. ............................................................................. 104 ?shudwlrqdopsolhu)xqfwlrqv ............. ............................................................................. 104 comparators ................................................................................................ 107 comparator operation ........................................................................................................ 107 comparator registers ......................................................................................................... 107 comparator f ? nctions ............. ............................................................................................ 109 interrupts ....................................................................................................... 111 interr ? pt register ................................................................................................................. 111 interr ? pt operation ............................................................................................................... 11 ? interr ? pt priorit ? .................................................................................................................... 11 ? externa ? interr ? pt ............. ..................................................................................................... 115 externa ? periphera ? interr ? pt ............. ................................................................................... 117 timer/event co ? nter interr ? pt .............................................................................................. 117 spi/i ? c interface interr ? pt .................................................................................................... 117 m ?? ti-f ? nction interr ? pt ......................................................................................................... 118 a/d interr ? pt ......................................................................................................................... 118 time base interr ? pt .............................................................................................................. 118 comparator interr ? pt ............................................................................................................ 119 eeprominterr ? pt ............. .................................................................................................. 1 ? 0 lvd interr ? pt ....................................................................................................................... 1 ? 0 interr ? pt wake- ? p f ? nction ................................................................................................. 1 ? 0 programming considerations ............. ................................................................................. 1 ? 0 buzzer ........................................................................................................... 121 power down mode and wake-up ................................................................ 123 entering the idle or sleep mode ............. ........................................................................ 1 ?? standb ? c ? rrent considerations ......................................................................................... 1 ?? wake- ? p .............................................................................................................................. 1 ?? low voltage detector C lvd .......... ............................................................. 124 lvd register ............. .......................................................................................................... 1 ? 4 lvd operation ..................................................................................................................... 1 ? 5 voice output ................................................................................................. 126 voice contro ? ....................................................................................................................... 1 ? 6 a ? dio o ? tp ? t and vo ?? me contro ? C dal ? dah ? dactrl ................................................. 1 ? 6 confguration options ................................................................................. 127 rev. 1.00 6 ???? 0 ?? ? 01 ? rev. 1.00 7 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators application circuits ........... .......................................................................... 128 instruction set .............................................................................................. 129 introd ? ction ......................................................................................................................... 1 ? 9 instr ? ction timing ................................................................................................................ 1 ? 9 moving and transferring data ............................................................................................. 1 ? 9 arithmetic operations .......................................................................................................... 1 ? 9 logica ? and rotate operation ............................................................................................. 1 ? 0 branches and contro ? transfer ........................................................................................... 1 ? 0 bit operations ..................................................................................................................... 1 ? 0 tab ? e read operations ....................................................................................................... 1 ? 0 other operations ............. .................................................................................................... 1 ? 0 instruction set summary .......... .................................................................. 131 tab ? e conventions ............................................................................................................... 1 ? 1 instruction defnition ................................................................................... 133 package information ................................................................................... 142 16-pin nsop (150mi ? ) o ? t ? ine dimensions ......................................................................... 14 ? ? 0-pin ssop (150mi ? ) o ? t ? ine dimensions ......................................................................... 14 ? ? 4-pin ssop (150mi ? ) o ? t ? ine dimensions ......................................................................... 144 product tape and reel specifcations ....................................................... 145 ree ? dimensions ................................................................................................................. 145 carrier tape dimensions ..................................................................................................... 146 rev. 1.00 6 ???? 0?? ?01? rev. 1.00 7 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators features cpu features ? operating voltage: C f sys = 32.768khz: 2.2v~5.5v C f sys = 910k hz: 2.2v~5.5v C f sys = 2 mhz: 2.2v~5.5v C f sys = 4mhz: 2.2v~5.5v C f sys = 8mhz: 3.3v~5.5v ? tinypower technology for low power operation ? power down and wake-up functions to reduce power consumption ? oscillator types: C external crystal - hxt C external 32.768khz crystal - lxt C external rc - erc C internal rc - hirc C internal 32khz rc - lirc ? multi-mode operation: normal, slow, idle and sleep ? fully integrated internal 32khz, 910khz, 2mhz, 4mhz and 8mhz oscillator requires no external components ? externally supplied system clock option ? all instructions executed in one or two machine cycles ? table read instructions ? 61 or 63 powerful instructions ? 6-level subroutine nesting ? bit manipulation instruction rev. 1.00 8 ???? 0 ?? ? 01 ? rev. 1.00 9 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators peripheral features ? flash program memory: 2k15 ? ram data memory: 1288 ? eeprom data memory: 648 ? watchdog t imer function ? up to 22 bidirectional i/o lines ? software controlled 4-scom lines lcd com driver with 1/2 bias ? multiple pin-shared external interrupts ? single 8-bit programmable t imer/event counter with overfow interrupt and single 16-bit programmable t imer/event counter with overfow interrupt function ? dual t ime-base functions ? serial interfaces module - sim for spi or i 2 c ? dual comparator functions ? dual operational amplifers functions ? operational amplifer output to internal two channel 12-bit adc function ? up to 6 channel 12-bit adc ? up to 2 channel 8-bit pwm ? 12-bit audio dac output ? pfd/buzzer for audio frequency generation ? internal 2.4v/3.3v ldo ? low voltage reset function ? low voltage detect function ? 16-pin nsop, 20/24-pin ssop package types rev. 1.00 8 ???? 0?? ?01? rev. 1.00 9 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators general description the HT45F23A is a flash memory t inypower a/d type 8-bit high performance risc architecture microcontrollers, designed especially for applications that interface directly to analog signals. the HT45F23A device has a higher gain bandwidth making it more suitable for higher frequency applications. offering u sers t he c onvenience o f fl ash me mory m ulti-programming f eatures, t he d evice a lso include s a wi de ra nge of func tions a nd fe atures. ot her m emory i ncludes a n a rea of ram da ta memory as well as an area of eeprom memory for storage of non-volatile data such as serial numbers, calibration data etc. analog features include an integrated multi-channel analog to digital converter , dual pulse width modulation outputs, dual operational amplifers , dual comparators , one internal 2.4v or 3.3v ldo (low drop out) for voltage regulator and a 12-bit dac for voice output application, communication wi th t he ou tside worl d i s c atered fo r by i ncluding fu lly i ntegrated spi or i 2 c interface functions, two popular interfaces which provide designers with a means of easy communication with external peripheral hardware. protective features such as an internal w atchdog timer, low v oltage reset and low v oltage detector coupled with excellent noise immunity and esd protection ensure that reliable operation is maintained in hostile electrical environments. a full choice of hxt , lxt , erc, hirc and lirc oscillator functions are provided including a fully integrated system oscillator which requires no external components for its implementation. the unique holtek t inypower techn ology also gives the device extremely low current consumption characteristics, an extremely important consideration in the present trend for low power battery powered applicati ons. the usual holtek mcu features such as power down and wake-up functions, oscillator options, programmable frequency divider , etc. combine to ensure user applications require a minimum of external components. the inclusion of fexible i/o programming features, t ime-base functions along with many other features e nsure t hat t he de vice wi ll fnd e xcellent use i n a pplications suc h a s e lectronic m etering, environmental monitoring, handheld instruments, household appliances, electronically controlled tools, motor driving, home security systems related to smoke detector and many others. rev. 1.00 10 ???? 0 ?? ? 01 ? rev. 1.00 11 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators block diagram the following block diagram illustrates the main functional blocks. ? ? ? ? ?? - ? ? ? ?? ? ? - ? ? ?? ? ?? ? ? ? - ? ? ? ?? ? ? ?? ? ? - ? ? ? ? ? rev. 1.00 10 ???? 0?? ?01? rev. 1.00 11 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators pin assignment pin description pin name function opt i/t o/t description pa0/cnp/ scom0 pa0 papu pawu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p ? wake- ? p. cnp cmp1c1 cmpi comparator inp ? t pin scom0 lcdc scom software contro ?? ed 1/ ? bias lcd com pa1/c1out/ tc0 pa1 papu pawu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p ? wake- ? p. c1out cmp1c1 cmpo comparator 1 o ? tp ? t pin tc0 st externa ? timer 0 c ? ock inp ? t pa ? /a1p/ c ? out pa ? papu pawu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p ? wake- ? p. a1p opa1c1 opai opa1 non-inverting inp ? t pin c ? out cmp ? c1 cmpo comparator ? o ? tp ? t pin pa ? /a1n/int0 pa ? papu pawu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p ? wake- ? p. a1n opa1c1 opai opa1 inverting inp ? t pin int0 st externa ? interr ? pt 0 inp ? t pin pa4/a1e/t c1 pa4 papu pawu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p and wake- ? p. a1e opa1c1 opao opa1 o ? tp ? t pin tc1 st externa ? timer 1 c ? ock inp ? t rev. 1.00 1 ? ???? 0 ?? ? 01 ? rev. 1.00 1? ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators pin name function opt i/t o/t description pa5/a ? p/pfd pa5 papu pawu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p and wake- ? p. a ? p opa ? c1 opai opa ? non-inverting inp ? t pin pfd misc cmos pfd o ? tp ? t pa6/a ? n/bz pa6 papu pawu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p and wake- ? p. a ? n opa ? c1 opai opa ? inverting inp ? t pin bz bpctl cmos b ? zzer o ? tp ? t pa7/a ? e/bz pa7 papu pawu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p and wake- ? p. a ? e opa ? c1 opao opa ? o ? tp ? t pin bz bpctl cmos comp ? ementar ? b ? zzer o ? tp ? t pb0/sdo/int1 pb0 pbpu misc st cmos nmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p and o ? tp ? t nmos str ? ct ? re. sdo cmos spi data o ? tp ? t int1 st externa ? interr ? pt 1 inp ? t pin pb1/sdi/sda pb1 pbpu misc st cmos nmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p and o ? tp ? t nmos str ? ct ? re. sdi st spi data inp ? t sda st nmos i ? c data pb ? /sck/scl pb ? pbpu misc st cmos nmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p and o ? tp ? t nmos str ? ct ? re. sck st spi seria ? c ? ock scl st nmos i ? c c ? ock pb ? /an0/ scs pb ? pbpu misc st cmos nmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p and o ? tp ? t nmos str ? ct ? re. an0 adcr an a/d channe ? 0 scs st spi s ? ave se ? ect pb4/an1/aud/ pck pb4 pbpu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p an1 adcr an cmos a/d channe ? 1 aud dactrl d/a o ? tp ? t pin pck cmos periphera ? c ? ock o ? tp ? t pb5/an ? / pint pb5 pbpu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p an ? adcr an a/d channe ? ? pint st periphera ? interr ? pt pb6/an ? / res pb6 pbpu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p an ? adcr an a/d channe ? ? res co st reset pin pc0/an4/ osc ? pc0 pcpu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p. an4 adcr an a/d channe ? 4 osc ? co hxt hxt pin pc1/an5/ osc1 pc1 pcpu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p. an5 adcr an a/d channe ? 5 osc1 co hxt hxt/erc pin rev. 1.00 1? ???? 0?? ?01? rev. 1.00 1 ? ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators pin name function opt i/t o/t description pc ? / xt1 pc ? pcpu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p. xt1 co lxt lxt pin pc ? / xt ? pc ? pcpu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p. xt ? co lxt lxt pin pc4/vref/ vcap/scom1 pc4 pcpu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p. vref acsr an adc reference inp ? t vcap ldoc ldo o ? tp ? t capacitor pin. connect a 0.1f capacitor. scom1 lcdc scom software contro ?? ed 1/ ? bias lcd com pc5/pwm0/ c1n/s com ? pc5 pcpu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p. pwm0 bpctl cmos pwm0 o ? tp ? t pin c1n cmp1c1 cmpi comparator 1 inverting inp ? t pin scom ? lcdc scom software contro ?? ed 1/ ? bias lcd com pc6/pwm1/ c ? p/ s com ? pc6 pcpu st cmos genera ? p ? rpose i/o. register enab ? ed p ??? - ? p. pwm1 bpctl cmos pwm1 o ? tp ? t pin c ? p cmp ? c1 cmpi comparator ? non-inverting inp ? t pin scom ? lcdc scom software contro ?? ed 1/ ? bias lcd com vdd vdd pwr power s ? pp ?? vss vss pwr gro ? nd note: i/t: input type o/t: output type opt: optional by confguration option (co) or register option pwr: power co: confguration option st: schmitt t rigger input cmos: cmos output scom: software controlled lcd com hxt: high frequency crystal oscillator lxt: low frequency crystal oscillator opai: operational amplifer input opao: operational amplifer output cmpi: comparator input cmpo: comparator output dao: d/a output rev. 1.00 14 ???? 0 ?? ? 01 ? rev. 1.00 15 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators absolute maximum ratings supply v oltage .............. .................................................................................. v ss ?0.3v to v ss +6.0v input v oltage .............. .................................................................................... v ss ? 0.3v to v dd +0.3v storage t emperature ............... ..................................................................................... -50? c to 125?c operating t emperature .............. .................................................................................... -40? c to 85 ?c i oh t otal .............. .................................................................................................................... -100ma i ol t otal .............. ..................................................................................................................... 100ma total power dissipation .............. .......................................................................................... 500mw note: t hese a re st ress ra tings onl y. st resses e xceeding t he ra nge spe cified und er "absol ute ma ximum ratings" m ay c ause su bstantial d amage t o t hese d evices. fu nctional o peration o f t hese d evices a t other c onditions be yond t hose l isted i n t he spe cifcation i s no t i mplied a nd pr olonged e xposure t o extreme conditions may affect devices reliability. d.c. characteristics 7d & symbol parameter test conditions min. typ. max. unit v dd conditions v dd operating vo ? tage f sys =910k hz ? (hxt/erc/hirc) ? . ? 5.5 v f sys = ? mhz ? (hxt/erc/hirc) ? . ? 5.5 v f sys =4mhz ? (hxt/erc/hirc/ec) ? . ? 5.5 v f sys =8mhz (hxt/erc/hirc/ec) ? . ? 5.5 v i dd1 operating c ? rrent (hxt ? erc) ? . ? v no ? oad ? f sys =f m =455khz ? adc off ? lvr off ? comparator off ? opas off 70 110 a operating c ? rrent (hxt ? erc) no ? oad ? f sys =f m = 455khz ? adc off ? lvr on ? comparator on ? opas off 100 150 a i dd ? operating c ? rrent (erc ? hirc) ? . ? v no ? oad ? f m =910khz ? f sys =f slow =455khz ? adc off ? lvr off ? comparator off ? opas off 90 1 ? 5 a operating c ? rrent (erc ? hirc) no ? oad ? f m =910khz ? f sys =f slow =455khz ? adc off ? lvr on ? comparator on ? opas off 1 ? 0 180 a i dd ? operating c ? rrent (erc ? hirc) ? . ? v no ? oad ? f sys =f m =910khz ? adc off ? lvr off ? comparator off ? opas off 110 170 a operating c ? rrent (erc ? hirc) no ? oad ? f sys =f m =910khz ? adc off ? lvr on ? comparator on ? opas off 160 ? 40 a rev. 1.00 14 ???? 0?? ?01? rev. 1.00 15 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators symbol parameter test conditions min. typ. max. unit v dd conditions i dd4 operating c ? rrent (hxt ? erc) ? . ? v no ? oad ? f sys =f m =1mhz ? adc off ? lvr off ? comparator off ? opas off 1 ? 0 180 a operating c ? rrent (hxt ? erc) no ? oad ? f sys =f m =1mhz ? adc off ? lvr on ? comparator on ? opas off 170 ? 60 a i dd5 operating c ? rrent (hxt ? erc ? hirc) ? . ? v no ? oad ? f sys =f m = ? mhz ? adc off ? lvr off ? comparator off ? opas off 170 ? 60 a operating c ? rrent (hxt ? erc ? hirc) no ? oad ? f sys =f m = ? mhz ? adc off ? lvr on ? comparator on ? opas off ? 00 ? 00 a i dd6 operating c ? rrent (hxt ? erc ? hirc) ? v no ? oad ? f sys =f m =4mhz ? adc off 4 ? 0 6 ? 0 a 5v 700 1000 a i dd7 operating c ? rrent (hxt ? erc ? hirc) 5v no ? oad ? f sys =f m =8mhz ? adc off 1.5 ? .0 ma i dd9 operating c ? rrent (s ? ow mode ? f m =4mhz) (hxt ? erc ? hirc) ? v no ? oad ? f sys =f slow =1mhz ? adc off ? 00 ? 00 a 5v 400 600 a i dd10 operating c ? rrent (s ? ow mode ? f m =4mhz) (hxt ? erc ? hirc) ? v no ? oad ? f sys =f slow = ? mhz ? adc off ? 50 ? 75 a 5v 560 840 a i dd1 1 operating c ? rrent (s ? ow mode ? f m =8mhz) (hxt ? erc ? hirc) ? v no ? oad ? f sys =f slow = ? mhz ? adc off ? 00 450 a 5v 680 10 ? 0 a i dd1 ? operating c ? rrent (s ? ow mode ? f m =8mhz) (hxt ? erc ? hirc) ? v no ? oad ? f sys =f slow =4mhz ? adc off 450 800 a 5v 1000 1500 a i dd1 ? operating c ? rrent (f sys =lxt (note 1) or lirc) ? v no ? oad ? wdt off ? adc off 10 ? 0 a 5v ? 0 ? 5 a i stb1 standb ? c ? rrent (s ? eep) (f sys ? f sub ? f s ? f wdt =off ) ? v no ? oad ? s ? stem halt ? wdt off 0.1 1.0 a 5v 0. ? ? .0 a i stb ? standb ? c ? rrent (s ? eep) (f sys off; f s on; f wdt =f sub =lxt (note 1) or lirc) ? v no ? oad ? s ? stem halt ? wdt on ? 4 a 5v 4 6 a i stb ? standb ? c ? rrent (id ? e) (f sys off; f wdt off; f s =f sub =lxt (note 1) or lirc) ? v no ? oad ? s ? stem halt ? wdt off 4 6 a 5v 6 9 a i stb4 standb ? c ? rrent (id ? e) (f sys on ? f sys =f m =4mhz; f wdt off; f s =f sub =lxt (note 1) or lirc) ? v no ? oad ? s ? stem halt ? wdt off ? spi or i ? c on ? pclk on ? pclk=f sys /8 ? 6 0 ? 5 0 a 5v ? 50 660 a v il1 inp ? t low vo ? ta ge for i/o ? t mr n and intn 0 0. ? v dd v v ih1 inp ? t high vo ? tage for i/o ? tmrn and intn 0.7v dd v dd v v il ? inp ? t low vo ? tage ( res) 0 0.4v dd v v ih ? inp ? t high vo ? tage ( res) 0.9v dd v dd v v il ? inp ? t low vo ? tage (pb1~pb ? ) 5v 1 v v ih ? inp ? t high vo ? tage (pb1~pb ? ) 5v ? v v lvr1 low vo ? tage reset v lvr = ? .10v -5% t ? p. ? .10 +5% t ? p. v v lvr ? v lvr = ? .55v ? .55 v lvr ? v lvr = ? .15v ? .15 v lvr4 v lvr =4. ? 0v 4. ? 0 rev. 1.00 16 ???? 0 ?? ? 01 ? rev. 1.00 17 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators symbol parameter test conditions min. typ. max. unit v dd conditions v lvd1 low vo ? tage detector vo ? tage lvden=1 ? v lvd = ? .0v -5% t ? p. ? .0 +5% t ? p. v v lvd ? lvden=1 ? v lvd = ? . ? v ? . ? v lvd ? lvden=1 ? v lvd = ? .4v ? .4 v lvd4 lvden=1 ? v lvd = ? .7v ? .7 v lvd5 lvden=1 ? v lvd = ? .0v ? .0 v lvd6 lvden=1 ? v lvd = ? . ? v ? . ? v lvd7 lvden=1 ? v lvd = ? .6v ? .6 v lvd8 lvden=1 ? v lvd =4.4v 4.4 i ol i/o port sink c ? rrent ? v v ol =0.1v dd 6 1 ? ma 5v 10 ? 5 ma i oh i/o port so ? rce c ? rrent ? v v oh =0.9v dd - ? -4 ma 5v -5 -8 ma r ph p ??? -high resistance ? v 40 60 80 k 5v 10 ? 0 50 k av dd a/d converter operating vo ? tage ? .7 5.5 v v ad a/d inp ? t vo ? tage 0 v ref v v ref a/d inp ? t reference vo ? tage range av dd =5v ? v dd v dnl adc differentia ? non-linearit ? ? v v ref =v dd ? t ad =1s 1 ? lsb 5v inl adc integra ? non-linearit ? ? v v ref =v dd ? t ad =1s ? 4 lsb 5v i adc additiona ? power cons ? mption if a/d converter is used ? v 0.5 1.0 ma 5v 1.5 ? .0 ma v bg bandgap reference with b ? ffer vo ? tage - ? % 1. ? 5 + ? % v i lvr dc c ? rrent when lvr or lvd t ? rn on ? v 10 15 a 5v ? 0 ? 0 a v scom v dd / ? vo ? tage for lcd com 5v no ? oad 0.475 0.500 0.5 ? 5 vdd v ldo / ? vo ? tage for lcd com 5v no ? oad 0.475 0.500 0.5 ? 5 vldo i dd q ? iescent c ? rrent 5v no ? oad ? a1oen/a ? oen fxed to 0 1 ? 0 a i out o ? tp ? t c ? rrent 5v isel=0 ? lcdbuf=disab ? e 10 a isel=1 ? lcdbuf=disab ? e ? 5 a isel=0 ? lcdbuf=enab ? e ? ma isel=1 ? lcdbuf=enab ? e ? ma 1rwh w sys sys sub sub s uu rev. 1.00 16 ???? 0?? ?01? rev. 1.00 17 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators a.c. characteristics ta= 25?c symbol parameter test conditions min. typ. max. unit v dd conditions f sys1 s ? stem c ? ock (hxt ? erc ? hirc) ? . ? v~5.5v 400 4000 khz ? . ? v~5.5v 400 8000 khz f sys ? 8mhz hirc ? . ? v ta=25?c - ? % 8 + ? % mhz ? . ? v ta=-40?c~85?c -5% 8 +5% mhz ? .7v~5.5v ta=-40?c~85?c -10% 8 +10% mhz f sys ? 4mhz hirc ? . ? v ta=25?c - ? % 4 + ? % mhz ? . ? v ta=-40?c~85?c -5% 4 +5% mhz ? .7v~5.5v ta=-40?c~85?c -10% 4 +10% mhz f sys4 ? mhz hirc ? . ? v ta=25?c - ? % ? + ? % mhz ? . ? v ta=-40?c~85?c -5% ? +5% mhz ? .7v~5.5v ta=-40?c~85?c -10% ? +10% mhz f sys5 910khz hirc ? . ? v ta=25?c - ? % 0.91 + ? % mhz ? . ? v ta=-40?c~85?c -5% 0.91 +5% mhz ? .7v~5.5v ta=-40?c~85?c -10% 0.91 +10% mhz f lxt s ? stem c ? ock (lxt) ?? .768 khz f erc 4mhz erc (note ? ) ? . ? v r=150k, ta=25?c - ? % 4 + ? % mhz ? . ? v r=150k, ta=-40?c~85?c -8% 4 +8% mhz ? .7v~5.5v r=150k, ta=-40?c~85?c -15% 4 +15% mhz t lirc ?? khz rc period ? v ? 8.10 ? 1. ? 5 ? 4.40 s t res externa ? reset low p ?? se width 1 s t lvr low vo ? tage width to reset 60 1 ? 0 ? 4 0 s t lvd low vo ? tage width to interr ? pt 1 ? t sub t lvds lvdo stab ? e time 5v lvr disab ? e ? lvd enab ? e ? vbg is read ? 100 s t sst1 s ? stem start- ? p timer period (w/o fast start- ? p) of hxt/tbc power ? p or wake- ? p from s ? eep mode 10 ? 4 t sys * (note 1) t sst ? s ? stem start- ? p timer period of erc ? hirc ? ec power ? p or wake- ? p from halt (id ? e or s ? eep mode) 1 ? t sys t sst ? s ? stem start- ? p timer period (with fast start- ? p) of hxt/tbc wake- ? p from id ? e mode (f sl =f tbc) 1 ? t tbc (note ? ) t sst4 s ? stem start- ? p timer period (with fast start- ? p) of hxt/tbc wake- ? p from id ? e mode (f sl =f lirc ) 1 ? t lirc t int interr ? pt p ?? se width 1 s t ad a/d c ? ock period 0.5 s t adc a/d conversion time (note 4) 16 t ad t on ? st a/d on to a/d start ? . ? v~5.5v ? s 1rwh w sys sys sub sub su u s u uu u ut su uu u yu s yu u rev. 1.00 18 ???? 0 ?? ? 01 ? rev. 1.00 19 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators op amplifer electrical characteristics ta= 25c symbol parameter test conditions min. typ. max. unit v dd conditions d.c. characteristic v dd operating vo ? tage ? . ? 5.5 v i dd q ? iescent c ? rrent 5v no ? oad ? a1oen/a ? oen [hgwr ? 00 ? 50 a v opos i np ? t offset vo ? tage 5v -1 +1 mv i opos inp ? t offset c ? rrent v dd =5v ? v cm =1/ ? v dd ? 7d a 10 na v cm common mode vo ? tage range v ss v dd -1.4 v psrr power s ? pp ?? rejection ratio 58 80 db cmrr common mode rejection ratio v dd =5v v cm =0~v dd -1.4v 58 80 db a.c. characteristic a ol open loop gain 60 80 db sr s ? ew rate+ ? rate- no ? oad 0.01 v/s gbw gain band width r l 0 l =100pf 100k ? .5 m hz comparator electrical characteristics ta= 25c symbol parameter test conditions min. typ. max. unit v dd conditions v ddc comparator operating vo ? tage ? . ? 5.5 v i ddc comparator operating c ? rrent ? v ? 0 40 a 5v ? 0 60 a v cpos1 comparator inp ? t offset vo ? tage 5v cxof4~0=(10000) -10 +10 mv v cpos ? comparator inp ? t offset vo ? tage 5v b ? ca ? ibration -4 +4 mv v cm comparator common mode vo ? tage range v ss v dd -1.4 v aol comparator open loop gain 60 80 db t pd1 comparator response time with ? mv overdrive ? s t pd ? comparator response time with 10mv overdrive 1.5 s ldo 2.4v 7d & symbol parameter test conditions min. typ. max. unit v dd conditions v ddin s ? pp ?? vo ? tage ? .7 5.5 v v ddout o ? tp ? t vo ? tage ? . ? 8 ? .40 ? .5 ? v i dd c ? rrent cons ? mption after start ? p ? no ? oad 50 70 a i out o ? tp ? t c ? rrent 5v v cap =1f ? 00 1100 a rev. 1.00 18 ???? 0?? ?01? rev. 1.00 19 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators ldo 3.3v ta= 25?c symbol parameter test conditions min. typ. max. unit v dd conditions v ddin s ? pp ?? vo ? tage ? .6 5.5 v v ddout o ? tp ? t vo ? tage ? .1 ? ? . ? 0 ? .46 v i dd c ? rrent cons ? mption after start ? p ? no ? oad 50 70 a i out o ? tp ? t c ? rrent 5v v cap =1f ? 00 1100 a 1rwh 7klv /'? fdq surylgh vwdeoh srzhu vxsso iru ??5 vhqvru zlwk d ) fds 7kh 95() slq vkrxog eh frqqhfwhg wr ) iru ' uhihuhqfh yrowd?h dqg ) iru ??5 vhqvru power-on reset characteristics ta= 25?c symbol parameter test conditions min. typ. max. unit v dd conditions v por vdd start vo ? tage to ens ? re power-on reset 100 mv rr vdd vdd raising rate to ens ? re power-on reset 0.0 ? 5 v/ms t por minim ? m time for vdd sta ? s at v por to ens ? re power-on reset 1 ms rev. 1.00 ? 0 ???? 0 ?? ? 01 ? rev. 1.00 ?1 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators system architecture a key factor in the high-performanc e features of the holtek range of microcontrollers is attributed to the internal system architecture. the device take s advantage of the usual features found within risc microcontrollers providing increase d speed of operation and enhanced performance. the pipelining scheme i s i mplemented i n su ch a wa y t hat i nstruction f etching a nd i nstruction e xecution a re overlapped, hence instructions are ef fectively executed in one cycle, with the exception of branch or call instructions. an 8-bit wide alu is used in practically all operations of the instruction set. it carries out arithme tic operations, logic operations, rotation, increment, decrement, branch decisions, etc. the internal data path is simplified by moving data through the accumulator and the alu. certain internal regis ters are implemented in the d ata m emory and can be directly or indirectly addressed. the simpl e addressing methods of these registers along with additional architectural features ensure that a minimum of external components is required to provide a functional i/o and a/d c ontrol system with m aximum reliability a nd fexibility. t his makes t he device suitable for l ow- cost, high-volume production for controller applications. clocking and pipelining the main system clock, derived from either a crystal/ resonator or rc oscillator is subdivided into four internally generated non-overlapping clocks, t1~t4. the program counter is incremented at the beginning of the t1 clock during which time a new instruction is fetched. the remaining t2~t4 clocks carry out the decoding and execution functions. in this way , one t1~t4 clock cycle forms one instruction cycle. although the fetching and execution of instructio ns takes place in consecutive instruction c ycles, t he pi pelining st ructure of t he m icrocontroller e nsures t hat i nstructions a re effectively executed in one instruction cycle. the exception to this are instructions where the contents of the program counter are changed, such as subroutine calls or jumps, in which case the instruction will take one more instruction cycle to execute. for instructions involving branches, such as jump or call instructions, two instruction cycles are required to complete instruction execution. an extra cycle is required as the program takes one cycle t o frst obt ain t he a ctual j ump or c all a ddress a nd t hen a nother c ycle t o a ctually e xecute t he branch. the requirement for this extra cycle should be taken into account by programmers in timing sensitive applications. ? ? ? ? ? system clocking and pipelining rev. 1.00 ?0 ???? 0?? ?01? rev. 1.00 ? 1 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators ? ? ? ? ? ? ? ? ? ? instruction fetching program counter during program execution, the program counter is used to keep track of the address of the next instruction to be executed. it is automatically incremented by one each time an instruction is executed except for instructions, such as "jmp" or "call" that demand a jump to a non-consecutive program memory address. note that the program counter width varies with the program memory capacity depending upon which device is selected. however , it must be noted that only the lower 8 bits, known as the program counter low register , are directly addressable by the application program. when executi ng instructions re quiring jumps to non-consecutive addresses suc h as a jump instruction, a subrout ine c all, i nterrupt or re set, e tc., t he m icrocontroller m anages progra m c ontrol by loading the required address into the program counter . for conditional skip instructions, once the condition has been met, the next instruction, which has already been fetched during the present instruction execut ion, is discarded and a dummy cycle takes its place while the correct instruction is obtained. program counter program counter high byte pcl register pc10~pc8 pcl7~pcl0 the lower byte of the program counter , known as the program counter low register or pcl, is available for program control and is a readable and writeable register . by transferring data directly into this register , a short program jump can be executed directly . however , as only this low byte is available for manipulation, the jumps are limited to the present page of memory that is 256 locations. when such program jumps are executed, it should also be noted that a dummy cycle will be inserted. the lower byte of the program counter is fully accessible under program control. manipulating the pcl might cause program branchin g, so an extra cycle is needed to pre-fetch. further information on the pcl register can be found in the special function register section. rev. 1.00 ?? ???? 0 ?? ? 01 ? rev. 1.00 ?? ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators stack this is a special part of the memory which is used to save the contents of the program counter only. the stack is or ganized into 6 levels and is neither part of the data or program memory space, and is neither readable nor writeabl e. the activated level is indexed by the stack pointer , sp , and is neither readable nor writeable. at a subroutine call or interrupt acknowledge signal, the contents of the program counter are pushed onto the stack. at the end of a subroutine or an interrupt routine, signaled by a return instruction, ret or reti, the program counter is restored to its previous value from the stack. after a device reset, the stack pointer will point to the top of the stack. if the stack is full and an enabled interrupt takes place, the interrupt request fag will be recorded but the acknowledge signal will be inhibited. when the stack pointer is decremented, by ret or reti, the interrupt will be serviced. this feature prevents stack overfow allo wing the programmer to use the struct ure more easily . however , when the stack is full, a call subroutine instruction can still be execu ted which will result in a stack overfow . precautions should be taken to avoid such cases which might cause unpredictable program branching. arithmetic and logic unit C alu the arith metic-logic unit or alu is a critical area of the microcontrol ler that carries out arithmetic and logic operations of the instructi on set. connected to the main micro controller data bus, the alu receives related ins truction codes and performs the required arithmetic or logical operations after which the result will be placed in the specifed register . as these alu calculation or operations may result in carry , borrow or other status changes, the status register will be correspondingly updated to refect these changes. the alu supports the following functions: ? arithmetic operations: add, addm, adc, adcm, sub, subm, sbc, sbcm, daa ? logic operations: and, or, xor, andm, orm, xorm, cpl, cpla ? rotation rra, rr, rrca, rrc, rla, rl, rlca, rlc ? increment and decrement inca, inc, deca, dec ? branch decision, jmp, sz, sza, snz, siz, sdz, siza, sdza, call, ret, reti rev. 1.00 ?? ???? 0?? ?01? rev. 1.00 ?? ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators flash program memory the program memory is the locatio n where the user code or program is stored. for this device the program memory is flash type, which means it can be programmed and re-programmed a lar ge number of times, allowing the user the convenience of code modifcation on the same device. by using the appropriate programming tools, th is flash device of fer users the fexibility to conveniently debug and develop their applications while also of fering a means of field programming and updating. structure the program memory has a capacity of 2k15 . the program memory is addressed by the program counter and also contains data, table information and interrupt entries. t able data, which can be setup in any location within the program memory, is addressed by separate table pointer registers. special vectors within t he progra m me mory, c ertain l ocations a re re served for spe cial usa ge suc h a s re set a nd interrupts. ? location 000h this vector is reserved for use by the device reset for program initialisation. after a device reset is initiated, the program will jump to this location and begin execution. ? location 004h this vector is used by the external interrupt 0. if the external interrupt pin receives an active edge, t he p rogram wi ll j ump t o t his l ocation a nd b egin e xecution i f t he e xternal i nterrupt i s enabled and the stack is not full. ? location 008h this vector is us ed by the external interrupt 1. if the external interrupt pin receives an active edge, t he p rogram wi ll j ump t o t his l ocation a nd b egin e xecution i f t he e xternal i nterrupt i s enabled and the stack is not full. ? location 00ch this internal vector is used by the t imer/event counter 0. if a t imer/event counter 0 overfow occurs, the program will jump to this location and begin execution if the timer/event counter interrupt is enabled and the stack is not full. ? location 010h this internal vector is used by the t imer/event counter 1. if a t imer/event counter 1 overfow occurs, the program will jump to this location and begin execution if the timer/event counter interrupt is enabled and the stack is not full. ? location 014h this internal vector is used by the spi/i 2 c interrupt. when either an spi or i 2 c bus, dependent upon which one is selected, requires data transfer , the program will jump to this location and begin execution if the spi/i 2 c interrupt is enabled and the stack is not full. ? location 018h this internal vector is used by the multi-function interrupt. when the t ime base overflows, the a/d converter completes its conversion process, an active edge appears on the external peripheral i nterrupt pi n, a com parator out put i nterrupt, a n ee prom w rite or re ad c ycle ends interrupt, or a l vd detection interrupt, the program will jump to this location and begin execution if the relevant interrupt is enabled and the stack is not full. rev. 1.00 ? 4 ???? 0 ?? ? 01 ? rev. 1.00 ?5 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators ? ? ?? ? ? ? ? program memory structure look-up table any location within the program memory can be defned as a look-up table where programmers can store fxed data. t o use the look-up table, the table pointer must frst be setup by placing the lower order a ddress o f t he l ook u p d ata t o b e r etrieved i n t he t able p ointer r egister, t blp. t his r egister defnes the lower 8-bit address of the look-up table. after setting up the table pointer , the table data can be retrieved from the current program memory page or last program memory page using the "t abrdc[m]" or "t abrdl [m]" instructions, respectively. when these instructions are executed, the lower order table byte from the program memory will be transferred to the user defined data memory register [m] as specified in the instruction. the higher order ta ble data byte from the program mem ory wil l be transferred to the tblh special register. any unused bits in this transferred higher order byte will be read as "0". the following diagram illustrates the addressing/data fow of the look-up table: ? ? instruction table location bits b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 tabrdc[m] pc10 pc9 pc8 @7 @6 @5 @4 @ ? @ ? @1 @0 tabrdl[m] 1 1 1 @7 @6 @5 @4 @ ? @ ? @1 @0 table location note: pc10~pc8:current program counter bits @7~@0:table pointer tblp bits rev. 1.00 ?4 ???? 0?? ?01? rev. 1.00 ? 5 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators table program example the accompanying example shows how the table pointer and table data is defned and retrieved from the device. this example uses raw table data located in the last page which is stored there using the org statement. the value at this org statement is 0700h which refers to the start address of the last page within the 2k program memory of the device. the table pointer is setup here to have an initial value of 06h. this will ensure that the frst data read from the data table will be at the program memory address 0706h or 6 locations after the start of the last page. note that the value for the table pointer is referenced to the frst address of the present page if the t abrdc [m] instruction is being used. the high byte of the table data which in this case is equal to zero will be transferred to the tblh register automatically when the tabrdl [m] instruction is executed. because the tblh register is a read-only register and cannot be res tored, care should be taken to ensure its protection if both the main routine and interrupt service routine use the table read instructions. if using the table read instructions, the interrupt service routines may change the value of tblh and subsequently cause errors if used again by the main routine. as a rule it is recommended that simultaneous use of the table read instructions should be avoided. however , in situations where simultaneous use cannot be avoided, the interrupts should be disabled prior to the execution of any main routine table-read instructions. note that all table related instructions require two instruction cycles to complete their operation. table read program example tempreg1 db ? ; temporary register #1 tempreg2 db ? ; temporary register #2 : : mov a ,06h ; initialise table pointer - note that this address is referenced mov tblp,a ; to the last page or present page : : tabrdl t empreg1 ; transfers value in table referenced by table pointer to tempregl ; data at prog. memory address "0706h" transferred to tempreg1 and tblh dec t blp ; reduce value of table pointer by one tabrdl t empreg2 ; transfers value in table referenced by table pointer to tempreg2 ; data at prog.memory address "0705h" transferred to tempreg2 and tblh ; in this example the data "1ah" is transferred to tempreg1 and data "0fh" ; to register tempreg2 the value "00h" will be transferred to the high ; byte register tblh : : org 7 00h ; sets initial address of last page dc 00 ah, 00bh, 00ch, 00dh, 00eh, 00fh, 01ah, 01bh : : rev. 1.00 ? 6 ???? 0 ?? ? 01 ? rev. 1.00 ?7 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators in circuit programming the provision of flash type program memory provides the user with a means of convenient and easy upgrades a nd m odifcations t o t heir p rograms o n t he sa me d evice. as a n a dditional c onvenience, holtek has provided a means of programming the microcontroller in-circuit using a 5-pin interface. this provides manufacturers with the possibility of manufacturing their circuit boards complete with a programmed or un-programmed microcontroller , and then programming or upgrading the program at a later stage. this enables product manufacturers to easily keep their manufactured products supplied with the latest program releases without removal and re-insertion of the device. programming pins function data seria ? data inp ? t/o ? tp ? t clk seria ? c ? ock res device reset vdd power s ? pp ?? vss gro ? nd the program memory and eeprom data memory can both be programmed serially in-circuit using this 5-wi re inte rface. dat a is downloaded and upl oaded serial ly on a single pin wit h an additi onal line for the clock. t wo additional lines are required for the power supply and one line for the reset. the technical details regarding the in-circuit programming of the device are beyond the scope of this document and will be supplied in supplementary literature. during the programming process the res pin will be held low by the programmer disabling the normal operation of the microcontroller and taking control of the p a0 and p a2 i/o pins for data and clock programming purposes. the user must there take care to ensure that no other outputs are connected to these two pins. programmer pin mcu pins res pb6 data pa0 clk pa ? programmer and mcu pins note: * m ay b e r esistor o r c apacitor. t he r esistance o f * m ust b e g reater t han 1 k o r t he c apacitance of * must be less than 1nf. rev. 1.00 ?6 ???? 0?? ?01? rev. 1.00 ? 7 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators ram data memory the data memory is a volatile area of 8-bit wide ram internal memory and is the location where temporary information is stored. ? ? ? ? ? ? data memory structure note: most of the data memory bits can be directly manipulated using the " set [m].i" and "clr [m].i" with the exception of a few dedicated bits. the data memory can also be accessed through the memory pointer registers. structure divided into two sections, the frst of these is an area of ram where special function registers are located. t hese r egisters h ave fx ed l ocations a nd a re n ecessary f or c orrect o peration o f t he d evice. many of these registers can be read from and written to directly under program control, however , some remain protecte d from use r manipulation. the second area of data mem ory is reserved for general purpose use . al l l ocations wi thin t his a rea a re re ad a nd wri te a ccessible unde r progra m control. the overall data memory is subdivided into two banks. the special purpose data memory registers are accessible in all banks, with the exception of the eec register at address 40h, which is only accessible in bank 1. switching between the dif ferent data memory banks is achieved by setting the bank pointer to the correct value. the start address of the data memory is the address "00h". all microcontroller programs require an area of read/write memory where temporary data can be stored and retrieve d for use later . it is this area of ram memory that is known as general purpose data memory . this area of data memory is fully accessible by the user program for both read and write operations. by using the "set [m].i" and "clr [m].i" instructio ns individual bits can be set or reset under program control giving the user a lar ge range of fexibility for bit manipulation in the data memory. rev. 1.00 ? 8 ???? 0 ?? ? 01 ? rev. 1.00 ?9 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators special function registers most of the special function register details will be described in the relevant functional section, however several registers require a separate description in this section. ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ???????? special purpose data memory indirect addressing registers C iar0, iar1 the indirect addressing registers, iar0 and iar1, although having their locations in normal ram register space, do not actually physically exist as normal registers. the method of indirect addressing for ram data manipulation uses these indirect addressing registers and memory pointers, in contrast to direct memory addressing, where the actual memory address is specifed. actions on the iar0 and iar1 registers will result in no actual read or write operatio n to these registers but rather to the memory location specifed by their corresponding memory pointer , mp0 or mp1. acting as a pair , ia r0 w ith m p0 and ia r1 w ith m p1, can together acces s data from the d ata m emory. a s the indirec t addressing re gisters are not physi cally i mplemented, rea ding t he indirec t addressi ng registers indirectl y will return a result of "00h" and writing to the registers indirectly will result in no operation. rev. 1.00 ?8 ???? 0?? ?01? rev. 1.00 ? 9 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators memory pointers C mp0, mp1 two me mory po inters, k nown a s mp0 a nd mp1 a re p rovided. t hese me mory po inters a re physically implemented in the data memory and can be manipulated in the same way as normal registers providing a convenient way with which to address and track data. when any operation to the releva nt indirect addressing registers is carried out, the actual address that the microcontroller is directed to, is the address specifed by the related memory pointer . mp0, together with indirect addressing register , iar0, are used to access data from bank 0, while mp1 and iar1 are used to access data from all banks according t o bp register. direct ad dressing c an only be used with bank 0, all other banks must be addressed indirectly using mp1 and iar1. the following example shows how to clear a section of four data memory locations already defned as locations adres1 to adres4. indirect addressing program example data .section " data" adres1 db ? adres2 db ? adres3 db ? adres4 db ? block db ? code .section at 0 code org 0 0h start: mov a,04h ; setup size of block mov block,a mov a,offset adres1 ; a ccumulator l oaded w ith f rst r am ad dress mov m p0,a ; s etup m emory po inter wi th f rst r am a ddress loop: clr i ar0 ; c lear t he d ata a t ad dress d efned b y m p0 inc mp0 ; increment memory pointer sdz block ; check if last memory location has been cleared jmp loop continue: the important point to note here is that in the example shown above, no reference is made to specifc data memory addresses. rev. 1.00 ? 0 ???? 0 ?? ? 01 ? rev. 1.00 ?1 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators bank pointer bp the data memory is divided into two banks, known as bank 0 and bank 1. a bank pointer , which is bit 0 of the bank pointer register is used to select the required data memory bank. only data in bank 0 c an b e d irectly a ddressed a s d ata i n b ank 1 m ust b e i ndirectly a ddressed u sing me mory pointer mp1 and indirect addressing register iar1. using memory pointer mp0 and indirect addressing re gister iar0 wi ll a lways a ccess da ta from ba nk 0, i rrespective of t he va lue of t he bank pointer . memory pointer mp1 and indirect addressing register iar1 can indirectly address data in either bank 0 or bank 1 depending upon the value of the bank pointer. the data memory is initialised to bank 0 after a reset, except for the wdt time-out reset in the idle/ sleep mode, in which case, the data memory bank remains unaf fected. it should be noted that special function data memory is not af fected by the bank selection, which means that the special function registers can be accessed from within either bank 0 or bank 1. directly addressing the data memory will always result in bank 0 being accessed irrespective of the value of the bank pointer. bp register bit 7 6 5 4 3 2 1 0 name dmbp0 r/w r/w por 0 bit 7 ~ 1 unimplemented, read as "0" bit 0 dmbp0 : select data memory banks 0: bank 0 1: bank 1 accumulator C acc the a ccumulator is central to the operation of any microcontroller and is clos ely related w ith operations carried out by the alu. the accumulator is the place where all intermediate results from the alu are stored. w ithout the accumulator it would be necessary to write the result of each c alculation or l ogical ope ration suc h a s a ddition, subt raction, shi ft, e tc., t o t he da ta me mory resulting i n highe r program ming and t iming overheads. da ta t ransfer operat ions usual ly i nvolve the t emporary st orage func tion of t he ac cumulator; for e xample, wh en t ransferring da ta be tween one user defi ned regi ster and anot her, it is necessary to do this by passing the data through the accumulator as no direct transfer between two registers is permitted. program counter low register C pcl to provide additional program control functions, the low byte of the program counter is made accessible to programmers by locating it within the special purpose area of the data memory . by manipulating this register , direct jumps to other program locations are easily implemented. loading a value directly into this pcl register will cause a jump to the specifed program memory location. however, as the register is only 8-bit wide, only jumps within the current program memory page are permitted. when such operations are used, note that a dummy cycle will be inserted. look-up table registers C tblp, tblh these three special function registers are used to cont rol operation of the look-up table which is stored in the program memory . tblp is the table pointer and indicates the location where the table data is located. the value must be setup before any table read commands are executed. their value can be changed, for example using the "inc" or "dec" instructions, allowing for easy table data pointing and reading. tblh is the location where the high order byte of the table data is stored after a table read data instruction has been executed. note that the lower order table data byte is transferred to a user defned location. rev. 1.00 ?0 ???? 0?? ?01? rev. 1.00 ? 1 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators status register C status this 8-bit register contains the zero fag (z), carry fag (c), auxiliary carry fag (ac), overfow fag (ov), power down fag (pdf), and watchdog time-out fag (t o). these arithmetic/logical operation and system management fags are used to record the status and operation of the microcontroller. with the exceptio n of the t o and pdf fags, bits in the status register can be altered by instructions like most other registers. any data written into the status register will not change the t o or pdf fag. in addition, operations related to the status register may give dif ferent results due to the dif ferent instruction operati ons. the t o fag can be af fected only by a system power -up, a wdt time-out or by executing the "clr wdt" or "hal t" instruction. the pdf fag is af fected only by executing the "halt" or "clr wdt" instruction or during a system power-up. the z, ov, ac and c fags generally refect the status of the latest operations. in additio n, on entering an interrup t sequence or executing a subroutine call, the status register will not be pushed onto the stack automatically . if the contents of the status registers are important and if the interrupt routine can change the status register , precautions must be taken to correctly save it. note that bits 0~3 of the status register are both readable and writeable bits. status register bit 7 6 5 4 3 2 1 0 name to pdf ov z ac c r/w r r r/w r/w r/w r/w por 0 0 x x x x "x" ? nknown bit 7 ~ 6 unimplemented, read as "0" bit 5 to : w atchdog t ime-out fag 0: after power up or executing the "clr wdt" or " halt" instruction 1: a watchdog time-out occurred. bit 4 pdf : power down fag 0: after power up or executing the "clr wdt" instruction 1: by executing the "halt" instruction bit 3 ov : overfow fag 0: no overfow 1: an operation results in a carry into the highest-order bit but not a carry out of the highest-order bit or vice versa. bit 2 z : zero fag 0: the result of an arithmetic or logical operation is not zero 1: the result of an arithmetic or logical operation is zero bit 1 ac : auxiliary fag 0: no auxiliary carry 1: an operation results in a carry out of the low nibbles in addition, or no borrow from the high nibble into the low nibble in subtraction bit 0 c : carry fag 0: no carry-out 1: an operation results in a carry during an addition operation or if a borrow does not take place during a subtraction operation c is also affected by a rotate through carry instruction. rev. 1.00 ?? ???? 0 ?? ? 01 ? rev. 1.00 ?? ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators eeprom data memory the ht 45f23a c ontains a n a rea o f i nternal e eprom da ta me mory eeprom, wh ich st ands for electrically erasable programmable read only memory , is by its nature a non-volatile form of re-programmable memory , with data retention even when its power supply is removed. by incorporating this kind of data memory , a w hole new hos t of application pos sibilities are made available to the designer . the avail ability of eeprom storage allows information such as product identification numbers, calibration values, specific user data, system setup data or other product information to be stored directly within the product microcontroller . the process of reading and writing data to the eeprom memory has been reduced to a very trivial affair. eeprom data memory structure the eeprom data memory capacity is 64 8 bits. unlike the program memory and ram data memory, the eeprom data memory is not directly mapped into mem ory space and is therefore not directly addressable in the same way as the other types of memory . read and w rite operations to the eeprom are carried out in single byte operations using an address and data register in bank 0 and a single control register in bank 1. eeprom registers three registers control the overall operation of the internal eeprom data memory . these are the address register , eea, the data register , eed and a single control register , eec. as both the eea and eed registers are located in bank 0, they can be directly accessed in the same was as any other special functi on regist er. the eec register however , be ing located in bank1, cannot be direct ly addressed directly and can only be read from or written to indirectly using the mp1 memory pointer and indirect addressing register , iar1. because the eec control register is located at address 40h in bank 1, the mp1 memory pointer must frst be set to the value 40h and the bank pointer register , bp, set to the value, 01h, before any operations on the eec register are executed. eeprom register list name bit 7 6 5 4 3 2 1 0 eea d5 d4 d ? d ? d1 d0 eed d7 d6 d5 d4 d ? d ? d1 d0 eec wren wr rden rd eea register bit 7 6 5 4 3 2 1 0 name d5 d4 d ? d ? d1 d0 r/w r/w r/w r/w r/w r/w r/w por x x x x x x "x" ? nknown %lw a 8qlpsohphqwhg uhdg dv %lw a 'dwd ((?5?0 dgguhvv 'dwd ((?5?0 dgguhvv elw a elw rev. 1.00 ?? ???? 0?? ?01? rev. 1.00 ?? ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators eec register bit 7 6 5 4 3 2 1 0 name wren wr rden rd r/w r/w r/w r/w r/w por 0 0 0 0 %lw a 8qlpsohphqwhg uhdg dv %lw wren 'dwd ((?5?0 : ulwh (qdeoh 'lvdeoh (qdeoh 7klv lv wkh ' dwd ((? 5?0 : ulwh (qdeoh %lw z klfk pxv w eh v hw kl?k ehiruh ' dwd ((?5?0 zulwh rshudwlrqv duh fduulhg rxw ohdulq? wklv elw wr ]hur zloo lqklelw 'dwd ((?5?0 zulwh rshudwlrqv %lw wr ((?5?0 : ulwh rqwuro : ulwh ffoh kdv qlvkhg fwlydwh d zulwh ffoh 7klv l v w kh 'd wd ( (?5?0 : ulwh rqwuro % lw d qg zk hq vh w k l?k e w kh d ssolfdwlrq sur?udp zloo dfwlydwh d zulwh ffoh 7klv elw zloo eh dxwrpdwlfdoo uhvhw wr ]hur e wkh kdugzduh diwhu wkh zulwh ffoh kdv qlvkhg 6hwwlq? wklv elw kl?k zloo kdyh qr hi ihfw li wkh :5(1 kdv qrw uvw ehhq vhw kl?k %lw rden 'dwd ((?5?0 5hdg (qdeoh 'lvdeoh (qdeoh 7klv lv wkh 'dwd ((?5?0 5hdg (qdeoh %lw zklfk pxvw eh vhw kl?k ehiruh 'dwd ((?5?0 uhdg rshudwlrqv duh fduulhg rxw ohdulq? wklv elw wr ]hur z loo lqklelw ' dwd ((?5?0 uhdg rshudwlrqv %lw rd ((?5?0 5hdg rqwuro 5hdg ffoh kdv qlvkhg fwlydwh d uhdg ffoh 7klv lv wkh 'dwd ((?5?0 5hdg rqwuro %lw dqg zkhq vhw kl ?k e wkh dssolfdw lrq sur?udp zloo dfwlydwh d uhdg ffoh 7klv elw zloo eh dxwrpdwlfdoo uhvhw wr ]hur e wkh kdugzduh diwhu wkh uhdg ffoh kdv qlvkhg 6hwwlq? wklv elw kl?k zloo kdyh qr hi ihfw li wkh 5'(1 kdv qrw uvw ehhq vhw kl?k 1rwh 7kh :5(1 :5 5'(1 dqg 5' fdq qrw eh vhw wr dw wkh vdph wlph lq rqh lqvwuxfwlrq 7kh :5 dqg 5' fdq qrw eh vhw wr dw wkh vdph wlph reading data from the eeprom to read data from the eep rom, the read enable bit, rden , in the eec register must frs t be set high to enable the read function. the eeprom address of the data to be read must then be placed in the eea register . if the rd bit in the eec register is now set high, a read cycle will be initiated. setting the rd bit high will not initiate a read operation if the rden bit has not been set. when the read cycle term inates, the rd bit will be automatically cleared to zero, after which the data can be read from the eed register . the data will remain in the eed register until another read or write operation i s e xecuted. t he a pplication pr ogram c an po ll t he r d bi t t o de termine whe n t he da ta i s valid for reading. rev. 1.00 ? 4 ???? 0 ?? ? 01 ? rev. 1.00 ?5 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators writing data to the eeprom to wr ite da ta t o t he e eprom, t he wr ite e nable bi t, w ren, i n t he e ec re gister m ust frst be se t high to enable the w rite function. the eep rom addres s of the data to be w ritten mus t then be placed in the eea register and the data placed in the eed register . if the wr bit in the eec register is now set high, an internal write cycle will then be initiated. setting the wr bit high will not initiate a write cycle if the wren bit has not been set. as the eeprom write cycle is controlled using an internal timer whose operation is asynchronous to microcontroller system clock, a certain time will elapse before the data will have been written into the eeprom. detecting when the write cycle has fni shed c an be i mplemented e ither by pol ling t he w r bi t i n t he e ec re gister or by usi ng t he eeprom i nterrupt. w hen t he wr ite c ycle t erminates, t he w r b it wi ll b e a utomatically c leared t o zero by the microcontroller , informing the user that the data has been written to the eeprom. the application program can therefore poll the wr bit to determine when the write cycle has ended. write protection 3urwhfwlr djdlvw ldgyhuwhw zulwh rshudwlr lv surylghg l vhyhudo zdv iwhu wkh ghylfh lv srzhuhgr w kh ulwh ( doh lw l w kh f rwuro u hjlvwhu zl oo h f ohduhg s uhyhwlj d zu lwh rshudwlrv ovr dw srzhu r wkh dn 3rlwhu 3 zloo h uhvhw wr ]hur zklfk phdv wkdw dwd 0hpru dn zloo h vhohfwhg v wkh ((3520 frwuro uhjlvwhu lv orfdwhg l dn wklv dggv d iuwkhu phdvuh ri surwhfwlr djdlvw vsulrv zulwh rshudwlrv ulj rupdo surjudp rshudwlr hvulj wkdw wkh ulwh (doh lw l wkh frwuro uhjlvwhu lv fohduhg zloo vdihjdug djdlvw lfruuhfw zulwh rshudwlrv eeprom interrupt the eeprom write or read interrupt is generated when an eeprom write or read cycle has ended. the eeprom interrupt must frst be enabled by setting the ee2i bit in the relevant interrupt register. however as the eeprom is contained within a multi-function interrupt, the associated multi- function interrupt enable bit must also be set. when an eeprom write cycle ends, the e2f request ag and its associated multi-function interrupt request ag will both be set. if the global, eeprom and multi-function interrupts are enabled and the stack is not full, a ump to the associated multi- function interrupt vector wi ll take place. when the interrupt is serviced only the multi-function interrupt ag will be automatically reset, the eeprom interrupt ag must be manually reset by the application program. more details can be obtained in the interrupt section. programming considerations &duh pvw h wdnh wkdw gdwd lv rw ldgyhuwhwo zulwwh wr wkh ((3520 3urwhfwlr fd h hkdfhg hvulj wkdw wkh ulwh (doh lw lv rupdoo fohduhg wr ]hur zkh rw zulwlj ovr wkh dn 3rlwhu frog h rupdoo fohduhg wr ]hur dv wklv zrog lkllw dffhvv wr dn zkhuh wkh ((3520 frwuro uhjlvwhu h[lvw owkrjk fhuwdlo rw hfhvvdu frvlghudwlr pljkw h jlyh l wkh dssolfdwlr surjudp wr wkh fkhfnlj ri wkh ydolglw ri hz zulwh gdwd d vlpsoh uhdg dfn surfhvv 7kh 5 lw l wkh ((& uhjlvwhu vkrog h vhw lpphgldwho diwhu wkh 5(1 lw lv vhw rwkhuzlvh wkh ((3520 zulwh ffoh zloo rw h h[hfwhg rev. 1.00 ?4 ???? 0?? ?01? rev. 1.00 ? 5 ???? 0 ?? ? 01 ? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators programming examples reading data from the eeprom ? polling method mov a, ee promadres u ser d efned ad dress mov eea, a mov a, 0 40h se tup m emory p ointer m p1 mov mp1, a mp1 p oints t o e ec r egister mov a, 0 1h se tup b ank p ointer mov bp, a set iar1.1 s et r den b it, e nable r ead o perations set iar1.0 s tart r ead c ycle - s et r d b it back: 6 ,5 f khf i h d f fh h - 0 3 . 5,5 ldeh 3520 h dlh 5 3 029 h h d dd h lh 0295b7 writing data to the eeprom ? polling method mov a, ee promadres u ser d efned ad dress mov eea, a mov a, e epromdata u ser d efned da ta mov eed, a mov a, 0 40h se tup m emory p ointer m p1 mov mp1, a mp1 p oints t o e ec r egister mov a, 0 1h se tup b ank p ointer mov bp, a set iar1.3 s et w ren b it, e nable w rite o perations set iar1.2 s tart w rite c ycle - s et w r b it back: 6 ,5 f khf i lh f fh h - 0 3 . 5,5 ldeh 3520 h dlh 5 3 rev. 1.00 ? 6 ???? 0 ?? ? 01 ? rev. 1.00 ?7 ???? 0?? ?01? HT45F23A 8-bit flash mcu with op amps & comparators HT45F23A 8-bit flash mcu with op amps & comparators oscillator various oscillator options of fer the user a wide range of functions according to their various application requirements. the flexible features of the oscillator functions ensure that the best optimisation can be achieved in terms of speed and power saving. oscillator selections and operation are selected through a combination of confguration options and registers. oscillator overview in additio n to being the source of the main system clock the oscillators also provide clock sources for t he w atchdog t imer a nd t ime b ase i nterrupts. e xternal o scillators r equiring so me e xternal components as well as fully integrated internal oscillators, requiring no external components, are pr ovided t o fo rm a wi de ra nge of bo th fa st a nd sl ow syst em osc illators. al l osc illator op tions are se lected t hrough t he c onfiguration o ptions. t he hi gher fr equency o scillators pr ovide hi gher performance b ut c arry wi th i t t he d isadvantage o f h igher p ower r equirements, wh ile t he o pposite is of course true for the lower frequency osc illators. w ith the capabil ity of dynamicall y switching between fas t and s low s ystem clock, the device has the flexibility to optimize the performance/ power ratio, a feature especially important in power sensitive portable applications. type name freq. pins externa ? cr ? sta ? hxt 400khz~8mhz osc1/osc ? externa ? rc erc 4mhz osc1 interna ? high speed rc hirc 910khz ? ? /4/8mhz externa ? c ? ock ec 400khz~8mhz osc1 externa ? low speed cr ? sta ? lxt ?? .768khz xt1/xt ? interna ? low speed rc lirc ?? khz oscillator types 6vwhp&orfn&rjudwlrv there a re si x m ethods of genera ting t he syst em c lock, four hi gh spe ed osc illators a nd t wo l ow speed oscillators. the high speed oscillators are the external crystal/ ceramic oscillator , external rc network o scillator, e xternal c lock a nd t he i nternal 9 10khz, 2 mhz, 4 mhz o r 8 mhz r c o scillator. the t wo l ow spee d osci llators a re t he i nternal 32khz rc osci llator a nd t he e xternal 32.768khz crystal oscillator. ? ? ? ? ? ? - ?? ? ? ? ?? ? ? ?? ? ??? ? ? ? ? ? ?? ? ? 6 \ v w h p & |